#ifndef PARTICLERENDERER_H
#define PARTICLERENDERER_H

#include "SceneManagerPrereq.h"

class Camera;
class RenderSystem;

class ParticleRenderer
{
public:
	ParticleRenderer(void);
	~ParticleRenderer(void);

	bool Init(int pre_alloc_size = 1024);
	void Shut();

	void Render(RenderSystem* render_system, Camera* camera);
	
	SceneObject* Create(Shader* shader, Texture* texture, Renderable* renderable);
	void Destroy(SceneObject* object);

private:
	void CullScene(Camera* camera);
	void SortScene();
	void RenderScene(RenderSystem* render_system);

private:
	OncePerFrame* m_frame;
	OncePerObject* m_object;
	Frustum m_frustum;

	Shader* m_shader;

	std::vector<SceneObject*> m_scene;
	std::vector<unsigned int> m_visible_scene;
	std::vector<unsigned int> m_sorted_scene;
};

#endif